import allRoutes from "./allRouters";
const dynamicRoutes = [{
    path: "/",
    name: "home",
    component: () =>
        import( /*webpackChunkName:"login"*/ "../pages/Home/index.vue"),
    // children: allRoutes
    //所有的用户都能访问到这个充值中心和充值管理
    redirect: "/welcome",
    children: [{//一级菜单
        path: "/vipmanager",
        name: "vipmanager", //具名路由
        component: () =>
            import( /*webpackChunkName:"vipmanager"*/ "../pages/Home/VipManager"),
        //路由元信息
        meta: {
            //储存一些用户定义的属性
            name: "Vip管理",
            icon: "iconfont icon-VIP", //储存菜单对应的图标类名
            fullPath: "/vipmanager" //当前路由的完整路径
        },
        children: [{
            path: "/charge",
            name: "charge", //具名路由
            component: () =>
                import( /*webpackChunkName:"charge"*/ "../pages/Home/VipManager/Charge/index.vue"),
            //路由元信息
            meta: {
                //储存一些用户定义的属性
                name: "Vip充值",
                icon: "iconfont icon-VIPchongzhi-", //储存菜单对应的图标类名
                fullPath: "/vipmanager/charge" //当前路由的完整路径
            },
        },
        {
            path: "/order",
            name: "order", //具名路由
            component: () =>
                import( /*webpackChunkName:"order"*/ "../pages/Home/VipManager/Order/index.vue"),
            //路由元信息
            meta: {
                //储存一些用户定义的属性
                name: "订单管理",
                icon: "iconfont icon-dingdanguanli", //储存菜单对应的图标类名
                fullPath: "/vipmanager/order" //当前路由的完整路径
            },
        }]
    }, {
        path: "pre_order",
        component: () => import(/*webpackChunkName:"pre_order"*/ "../pages/Home/PreOrder/index.vue"),
        name: "pre_order",
        meta: {
            name: "预支付"
        }
    }, {
        path: "payment",
        name: "payment",
        component: () => import(/*webpackChunkName:"payment"*/ "../pages/Home/payMent/index.vue"),
        meta: {
            name: "支付主页"
        },
        children: [{
            path: "pay",
            name: "pay",
            component: () => import(/*webpackChunkName:"pay"*/ "../pages/Home/payMent/Pay/index.vue"),
            meta: {
                name: "支付页"
            }
        }, {
            path: "paySuccess",
            name: "paySuccess",
            component: () => import(/*webpackChunkName:"paySuccess"*/ "../pages/Home/payMent/PaySuccess/index.vue"),
            meta: {
                name: "支付成功页"
            }
        }]
    }],

},
{
    path: "*",
    component: () =>
        import( /*webpackChunkName:"page404"*/ "../pages/Page404/index.vue")
}
]

export default dynamicRoutes;